/*
*  Copyright 2019-2023 CY
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.xiao.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.NoArgsConstructor;
import me.zhengjie.base.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
* @description /
* @author cui
* @date 2024-10-28
**/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("cg_user_tem")
public class CgUserTem implements Serializable {

    @NotNull(groups = BaseEntity.Update.class)
    @TableId(value="user_id", type = IdType.INPUT)
    @ApiModelProperty(value = "userId")
    private Long id;

    @NotBlank
    @TableField(value = "nick_name")
    @ApiModelProperty(value = "用户昵称")
    private String nickName;

    @ApiModelProperty(value = "订单状态  1启用、0禁用")
    private Integer orderFlag;

    @ApiModelProperty(value = "跟进状态 1启用、0禁用")
    private Integer followFlag;

    @ApiModelProperty(value = "客户状态 1启用、0禁用")
    private Integer customerFlag;

    public void copy(CgUserTem source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
